<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/10/2
  Time: 23:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
    <base href="<%=basePath%>"/>
    <title>购物车查看界面</title>
</head>
<body>
<h1>购物车信息查看</h1>
<hr/>
<c:forEach items="${cart.cartProductVos}" var="product">
    <span>${product.productSubtitle}</span>
    <div onclick="location.href='product.do?id=${product.productId}'" title="详情查看">
        <input type="checkbox" <c:if test="${product.productChecked==1}">checked</c:if>/>
        <img src="${cart.imageHost}${product.productMainImage}" alt="主图" width="100px">
        <span>商品ID  :${product.productId}</span>
        <span>商品名称:${product.productName}</span>
        <span>商品数量:${product.quantity}</span>
        <span>商品单价:${product.productPrice}</span>
        <span>商品总价:${product.productTotalPrice}</span>
    </div>
    <hr style="height: 2px"/>
</c:forEach>
<h3>勾选商品总价:${cart.cartTotalPrice}</h3>
</body>
</html>
